/*
 * @Author: huangtianyang 916072572@qq.com
 * @Date: 2023-09-21 09:30:46
 * @LastEditors: huangtianyang
 * @LastEditTime: 2023-09-21 09:36:29
 * @FilePath: \cxl-admin\src\apis\company\trial.ts
 */
import axios from '../../axios/index'

export interface trialType {
    companyName?: string
    size: number
    current: number
}

/**
 * 企业试用管理
 * @param params
 * @returns
 */
export const companyTrial = (params: trialType) => {
    return axios({
        method: 'get',
        url: '/api/system/company/trialList',
        params
    })
}

/**
 * 设置系统免费试用次数
 * @param companyId
 * @param freeCountMap
 * @param remarks
 * @returns
 */
export const setCompanyTrialCount = (companyId: string, freeCountMap: object, remarks?: string) => {
    return axios({
        method: 'post',
        url: '/api/mall/company/store/set-system-free-count',
        data: {
            companyId,
            freeCountMap,
            remarks
        }
    })
}
